import { ScriptExecution } from "engines";
import { InjectionToken } from "tsyringe";
import { Record } from "../core/Record";

export interface IScriptManager {
    scriptExecutions: Map<InjectionToken<any>, ScriptExecution>;
    start(name: string, script: string, record?: Record): void;
    main(path: string, name?: string): void;
    emit(type: InjectionToken<any>, payload?: any): void;
    watchMain(fn: (script: IScriptManager) => void): void;
    stop(name: string): void;
    dispose(): void | Promise<void>;
}